﻿using System;

namespace EmbeddedSharp.Core {
    public abstract class OperatorNode : FuncNode {

        /// <summary>
        /// Left operator
        /// </summary>
        public Node Left {
            get;
            set;
        }

        /// <summary>
        /// Right operator
        /// </summary>
        public Node Right {
            get;
            set;
        }

        /// <summary>
        /// Default constructor
        /// </summary>
        public OperatorNode()
            : base() {
        }

        /// <summary>
        /// Constructor with naming
        /// </summary>
        /// <param name="name">the name of the operator</param>
        public OperatorNode(string name)
            : base(name) {
        }

        /// <summary>
        /// Constructor with name and precedence
        /// </summary>
        /// <param name="name">the operator name</param>
        /// <param name="precedence">the operator precedence</param>
        public OperatorNode(string name, int precedence)
            : base(name, precedence) {
        }
    }
}
